package com.huawei.esdk.tp.device.smc;

import org.apache.log4j.Logger;

import com.huawei.esdk.platform.nemgr.base.MultiConnDeviceBase;
import com.huawei.esdk.platform.nemgr.itf.IDeviceConnection;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00ConferenceControlCapabilityImpl;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00ConferenceManagerCapabilityImpl;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00IConferenceControlCapability;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00IConferenceManagerCapability;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00ISiteManagerCapability;
import com.huawei.esdk.tp.device.smc.v100r003c00.SMC20V1R3C00SiteManagerCapabilityImpl;

/**
 * 设备能力管理类
 * <p>
 * @author  cWX191990
 * @see  [相关类/方法]
 * @since  [eSDK TP V100R003C20]
 */
public class SMC20V1R3C00Device extends SMCDevice
{
    private static final Logger LOGGER = Logger.getLogger(MultiConnDeviceBase.class);
    
    public SMC20V1R3C00Device(String sap)
    {
        super(sap);
    }
    
    protected void prepareDeviceCapability()
    {
        LOGGER.debug("IN prepareDeviceCapability method");
        addServiceObjectMap(SMC20V1R3C00ISiteManagerCapability.class,
            new SMC20V1R3C00SiteManagerCapabilityImpl(this.cxfSOAPProtocolAdapter));
        addServiceObjectMap(SMC20V1R3C00IConferenceControlCapability.class,
            new SMC20V1R3C00ConferenceControlCapabilityImpl(this.cxfSOAPProtocolAdapter));
        addServiceObjectMap(SMC20V1R3C00IConferenceManagerCapability.class,
            new SMC20V1R3C00ConferenceManagerCapabilityImpl(this.cxfSOAPProtocolAdapter));
    }
    
    @Override
    public IDeviceConnection createConnection(String appId, String sap, String user, String pwd)
    {
        return new SMC20V1R3C00Connection(cxfSOAPProtocolAdapter, this, user, pwd, buildAuthorizePolicy());
    }
}